package com.dcloud.core.dsplugin;

import org.jeecg.common.api.vo.Result;

import java.util.List;
import java.util.Map;

public interface IDsService {

    /**
     * @Description //根据数据源id 测试是否可连接
     **/
    Result testConn(Integer id) throws ClassNotFoundException, InstantiationException, IllegalAccessException;

    List<Map<String, Object>> selectSqlBySourceId(String sql, Integer sourceId, Long limit) throws ClassNotFoundException, InstantiationException, IllegalAccessException;

    Result<?> getAllTableFromDs(Integer tid) throws ClassNotFoundException, InstantiationException, IllegalAccessException;

    Result<?> getAllSourceByType(String sourceCode);
}
